home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
trueSpace 7.6
/
tS761B8Std.exe
/
{app}
/
Scripts
/
ScriptCommands
/
D3DCreateCamera.xml
< prev
next >
Wrap
Extensible Markup Language
|
2008-06-10
|
2KB
|
51 lines
<?xml version="1.0" encoding="utf-8" ?>
<SCRIPT Name="D3DCreateCamera" Type="command" Description="create camera" GUID = "{251D61AD-863B-4b0f-8B1A-56BBF64C81EB}">
<SCRIPT_CODE><![CDATA[
function Execute(ret)
{
var root = Space.CurrentScene();
// first create encapsulator node
encaps = Node.Create('{649B82DC-EFDC-4BB3-A511-1AB075F63DFF}', root);
encaps = Node.SafeRename(encaps,'Camera');
// create transform node
TransformNode = Node.Create('{B386099D-8ADA-4130-A0BC-7F7F75D437C9}', encaps);
Node.Value(TransformNode,'roll') = -143.200;
Node.Value(TransformNode,'pitch') = 35.800;
Node.Value(TransformNode,'yaw') = -34.800;
Node.Value(TransformNode,'tx') = 14.700;
Node.Value(TransformNode,'ty') = 13.700;
Node.Value(TransformNode,'tz') = 16.700;
// export matrix connector of the transform node
Node.ExportConnector(TransformNode, 'WldMatrix', '', 1, 1);
// export translation - tx, ty, tz connectors of the transform node
// used by camera move toolcmd
Node.ExportConnector(TransformNode, 'tx', '', 1, 1);
Node.ExportConnector(TransformNode, 'ty', '', 1, 1);
Node.ExportConnector(TransformNode, 'tz', '', 1, 1);
// export translation - rx, ry, rz connectors of the transform node
// used by camera Rotate toolcmd
Node.ExportConnector(TransformNode, 'roll', '', 1, 1);
Node.ExportConnector(TransformNode, 'pitch', '', 1, 1);
Node.ExportConnector(TransformNode, 'yaw', '', 1, 1);
// Create D3D Camera node
CameraNode = Node.Create('{A3840F5E-790D-413A-AB1F-492EE88FF1A5}', encaps);
// export FOV angle connector of the camera node
// used by camera FOV toolcmd
Node.ExportConnector(CameraNode, 'D3DCAM_FOV', '', 1, 1);
// export D3D Camera connector
Node.ExportConnector(CameraNode, 'D3DCAM_D3DCamera', '', 1, 1);
RsTool.CameraView(encaps,'');
}
]]></SCRIPT_CODE>
</SCRIPT>